import App from "./App";

// #ifndef VUE3
import Vue from "vue";
import "./uni.promisify.adaptor";

import share from "@/utils/share.js";
Vue.mixin(share);

Vue.config.productionTip = false;

import _ from "lodash";
Vue.prototype._ = _;
import MyLayout from "@/components/my-layout/index.vue";
Vue.component("my-layout", MyLayout);
import MyTopBackground from "@/components/my-top-background/index.vue";
Vue.component("my-top-background", MyTopBackground);
import MySwiper from "@/components/my-swiper/index.vue";
Vue.component("my-swiper", MySwiper);
import MyWaterFlow from "@/components/my-water-flow/index.vue";
Vue.component("my-water-flow", MyWaterFlow);
import GeoSelect from "@/components/geo-select/index.vue";
Vue.component("geo-select", GeoSelect);
// 安装 Vuex
import store from "@/store/index";

App.mpType = "app";

const app = new Vue({
  ...App,
  share,
  store,
});

app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from "vue";
export function createApp() {
  const app = createSSRApp(App);
  return {
    app,
    share,
    store,
  };
}
// #endif
